Component({
  properties: {
    options: {
      type: Array,
      value: ''
    },
    index: {
      type: Number,
      value: 0,
      observer: function(newVal, oldVal) {
        this.setData({
          index: newVal
        })
      }
    }
  },
  data: {
    index: 0
  },
  methods: {
    bindChange(e) {
      this.setData({
        index: e.detail.value
      })
      this.triggerEvent('change', { index: e.detail.value })
    }
  }
})